<?php
/* --------------------------------------------------------------
   GMLangFileMaster.php 2012-05-04 gm
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2012 Gambio GmbH
   Released under the GNU General Public License (Version 2)
   [http://www.gnu.org/licenses/gpl-2.0.html]
   --------------------------------------------------------------
*/

class GMLangFileMaster 
{
	function define_lang_file_content($p_file_path)
	{		
		$t_sql = "SELECT
						c.constant_name,
						c.constant_value
					FROM
						gm_lang_files f,
						gm_lang_files_content c
					WHERE
						f.file_path = '" . xtc_db_input($p_file_path) . "'
						AND f.lang_files_id = c.lang_files_id";

		$t_result = xtc_db_query($t_sql);

		while($t_result_array = xtc_db_fetch_array($t_result)) 
		{
			$t_command = "define('" . $t_result_array['constant_name'] . "', '" . $t_result_array['constant_value'] . "'); ";
			eval($t_command);
		}
	}
}
?>